module Websitearticles2Helper
  def last_updated_at_column(record) 
    if record.last_updated_at.nil? 
      "" 
    else   
      record.last_updated_at.strftime("%d/%m/%Y %H:%M:%S")
    end
  end
  
  def last_accessed_at_column(record)    
    if record.last_accessed_at.nil? 
      "" 
    else
      record.last_accessed_at.strftime("%d/%m/%Y %H:%M:%S")
    end
  end
  def published_at_column(record)    
    if record.published_at.nil? 
      "" 
    else
      record.published_at.strftime("%d/%m/%Y %H:%M:%S")
    end
  end
  
    def created_at_column(record)    
    if record.created_at.nil? 
      "" 
    else
      record.created_at.strftime("%d/%m/%Y %H:%M:%S")
    end
  end
  
   def body_form_column(record, input_name)
	text_area :record, :body, :name  =>  input_name,:cols => 120, :rows => 30,  :style  =>  "height:auto;"
 end

  
  def body_column(record)
	 textilize(record.body)
	end  
	
  def synopsis_column(record)
	 textilize(record.synopsis)
	end 	 
	
 
end
